Skip to content

Add an initial test app #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

rogerhu
Copy link
Contributor

@rogerhu rogerhu commented Mar 21, 2017

Mostly for reference. Based on iOS Xcode app.

mmimeault
mmimeault previously approved these changes Mar 22, 2017
Copy link
Contributor

@mmimeault mmimeault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much, really appreciated.


public void setName(String name) {
this.name = name;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ParseObject using key-value pair to manage data.
You need to use put(key, value)/get(key) inside your getter/setter. (That's why you can't retrieve data from the server.)

ex.

@ParseClassName("Room")
public class Room extends ParseObject {
  
  public Room() {

  }

  public String getName() {
    return getString("name");
  }

  public void setName(String name) {
    put("name", name);
  }

}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue in Message.java as well.


public class MainActivity extends AppCompatActivity {

String URL = "http://192.168.3.9:1337/parse/";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable named uppercase URL may be confused with the URL class.
String url
I recommend using lowercase to improve readability.

public void done(Room room, ParseException e) {
if (e != null) {
Log.d(DEBUG_TAG, "Found exception" + e);
e.printStackTrace();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need deal with the exceptions?

// op=subscribe, className=Message, roomName=null, requestId=1, order=createdAt
ParseQuery<Message> parseQuery = ParseQuery.getQuery(Message.class);
// FIXME
parseQuery.whereEqualTo("roomName", "test");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should parseQuery.whereEqualTo("room", room);?

@mmimeault mmimeault dismissed their stale review March 24, 2017 13:48

hermanliang has really good comments, waiting for edit first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants